package cz.vargarob.spring.config;

import org.apache.commons.logging.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import cz.vargarob.spring.repository.AccountRepository;
import cz.vargarob.spring.repository.AccountRepositoryImpl;
import cz.vargarob.spring.service.TransferService;
import cz.vargarob.spring.service.TransferServiceImpl;

@Configuration
public class AppTestConfig {

	@Autowired
	private Log myLog;
	@Bean
	public AccountRepository accountRepo(){
		return new AccountRepositoryImpl();
	}
	
	@Bean
	public TransferService transferService(){
		return new TransferServiceImpl(accountRepo(), myLog);
	}

	public Log getMyLog() {
		return myLog;
	}

	public void setMyLog(Log myLog) {
		this.myLog = myLog;
	}
	
	
}
